<?php
class User extends AppModel {
    var $useTable = 'users';
    var $name = 'User';
    var $hasAndBelongsToMany = array(
        'Role' => array(
            'className' => 'Role',
            'joinTable' => 'users_roles',
            'foreignKey' => 'user_id',
            'associationForeignKey' => 'role_id',
        )
    );
}